import request from "@/utils/request"


export function getAllTeacher(id) {
  return request({
    url: `/eduService/teacher/findAll`,
    method: 'get',
  })
}
export function getTeacherListPage(page, limit, teacherQuery) {
  return request({
    //url: '/eduService/teacher/pageTeacherCondition/' + page + '/' + limit,
    url: `/eduService/teacher/pageTeacherCondition/${page}/${limit}`,
    method: 'post',
    data: teacherQuery,
  })
}

export function removeDataById(id) {
  return request({
    //url: '/eduService/teacher/pageTeacherCondition/' + page + '/' + limit,
    url: `/eduService/teacher/${id}`,
    method: 'delete',
  })
}

export function saveTeacher(teacher) {
  return request({
    //url: '/eduService/teacher/pageTeacherCondition/' + page + '/' + limit,
    url: `/eduService/teacher/addTeacher`,
    method: 'post',
    data: teacher
  })
}

export function getTeacherInfo(id) {
  return request({
    //url: '/eduService/teacher/pageTeacherCondition/' + page + '/' + limit,
    url: `/eduService/teacher/getTeacher/${id}`,
    method: 'get',
  })
}

export function updateTeacher(teacher) {
  return request({
    url: `/eduService/teacher/updateTeacher`,
    method: 'post',
    data: teacher
  })
}
